<template>
  <div class="picker">
    <el-date-picker
            v-model="time"
            type="date"
            @change="saveSelect"
            formate="yyyy-MM-dd"
            value-format="yyyy-MM-dd hh:mm:ss"
            placeholder="选择日期">
    </el-date-picker>
  </div>
</template>

<script>
  export default {
    name: "MyDatePicker",
    props:{
      question_key: String,
      value:''
    },
    data(){
      return{
        time:''
      }
    },
    mounted() {
      this.time = this.value
    },
    methods:{
      saveSelect(){
        this.$emit('saveSelect',[this.question_key,this.time])
      }
    }
  }
</script>

<style scoped>
  /deep/.el-input__inner{
    border: 1px solid white !important;
    width: 540px !important;
    color: #898787;
    font-size: 18px;
    padding :0 !important;
  }
  .el-input__inner::placeholder{
    display: none;
  }
  /deep/.el-input__prefix{
    display: none !important
  }
</style>